package com.jspgou.cms.dao;

import java.util.Date;
import java.util.List;

import com.jspgou.common.hibernate3.Updater;
import com.jspgou.common.page.Pagination;
import com.jspgou.cms.entity.Consult;

public interface ConsultDao {
	public Consult findById(Long id);

	public Consult saveOrUpdate(Consult bean);

	public Consult update(Consult bean);
	
	public Consult updateByUpdater(Updater<Consult> updater);

	public Consult deleteById(Long id);
	
	public Pagination getPage(Long productId,Long memberId,Long storeId,String consultType,String userName,String productName,
			Date startTime,Date endTime,int pageNo,int pageSize,boolean cache);
	
	public Consult getSameConsult(Long memberId);
	
	public Pagination getPage(Long memberId,Long storeId,int pageNo,int pageSize,boolean cache);

	//添加方法，根据咨询类型删除记录
	public List<Consult> deleteByType(String consultType);
	//添加方法，根据咨询类型查找consult
	public List<Consult> findByType(Long productId,String consultType);
}